﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomeSite.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TimeTableManagement.Entities.Tb_Role>>" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">


    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        GroupBoxCaptionOffsetY="-28px" HeaderText="Role Management"
        SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
        <ContentPaddings Padding="14px" />
        <PanelCollection>
<dx:PanelContent ID="PanelContent1" runat="server" >
<div class="display-field">
        <table class="tableview">
            <tr class="tableheader">
                <td class="tablecell">
                    ID</td>
                <td class="tablecell">
                    Role Name</td>
                <td class="tablecell">
                    Description</td>
                    <td></td>
            </tr>
            <% int i =0 ; foreach (var item in Model)
               {
                   i++; %>
               <% if (i % 2 != 0)
                  { %>
            <tr style="background-color:#EFF3FB;">
            <% }
                  else
                  { %>
                  <tr style="background-color:White;">
            <% } %>
                <td class="tablecell">
                    <%= item.id %></td>
                <td class="tablecell">
                    <%:  Html.ActionLink(item.rolename,"Details", new {id=item.id}) %></td>
                <td class="tablecell">
                    <%= item.description %></td>
                <td class="tablecell">
                    <%: Html.ActionLink("Edit", "Edit", new { id=item.id }) %> |
                    <%: Html.ActionLink("Delete", "Delete", new { id=item.id }) %>
                </td>
            </tr>
            <% } %>
        </table>
    </div>
</dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="leftmenu" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="menuright" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
